---
hide_title: true
title: 'DecorationExtension'
---

import PersistentSelection from '../../website/extension-examples/extension-decoration/persistent-selection';

# `DecorationExtension`

## Summary

`DecorationExtension` is a builtin extension that simplifies the process of adding decorations to the editor. It provides a persistent selection feature that can be used to preserve the marker for the selection when the editor loses focus.

### Examples

<PersistentSelection />
